
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gummworld2.tiledtmxloader</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="gummworld2.html"><font color="#ffffff">gummworld2</font></a>.tiledtmxloader</strong></big></big> (version 2.3.1.1)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/cygwin/home/bw/devel/python/svn/gummworld2/gamelib/gummworld2/tiledtmxloader.py">c:\cygwin\home\bw\devel\python\svn\gummworld2\gamelib\gummworld2\tiledtmxloader.py</a></font></td></tr></table>
    <p><tt><a href="#TileMap">TileMap</a>&nbsp;loader&nbsp;for&nbsp;python&nbsp;for&nbsp;Tiled,&nbsp;a&nbsp;generic&nbsp;tile&nbsp;map&nbsp;editor<br>
from&nbsp;<a href="http://mapeditor.org/">http://mapeditor.org/</a>&nbsp;.<br>
It&nbsp;loads&nbsp;the&nbsp;\*.tmx&nbsp;files&nbsp;produced&nbsp;by&nbsp;Tiled.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
<a href="xml.dom.minidom.html">xml.dom.minidom</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#ImageLoaderPygame">ImageLoaderPygame</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#ImageLoaderPyglet">ImageLoaderPyglet</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#MapObject">MapObject</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#MapObjectGroup">MapObjectGroup</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#RendererPygame">RendererPygame</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#Tile">Tile</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#TileImage">TileImage</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#TileLayer">TileLayer</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#TileMap">TileMap</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#TileMapParser">TileMapParser</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.tiledtmxloader.html#TileSet">TileSet</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="IImageLoader">class <strong>IImageLoader</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Interface&nbsp;for&nbsp;image&nbsp;loading.&nbsp;Depending&nbsp;on&nbsp;the&nbsp;framework&nbsp;used&nbsp;the<br>
images&nbsp;have&nbsp;to&nbsp;be&nbsp;loaded&nbsp;differently.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="IImageLoader-load_image"><strong>load_image</strong></a>(self, filename, colorkey<font color="#909090">=None</font>)</dt><dd><tt>Load&nbsp;a&nbsp;single&nbsp;image.<br>
&nbsp;<br>
:Parameters:<br>
&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Path&nbsp;to&nbsp;the&nbsp;file&nbsp;to&nbsp;be&nbsp;loaded.<br>
&nbsp;&nbsp;&nbsp;&nbsp;colorkey&nbsp;:&nbsp;tuple<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;(r,&nbsp;g,&nbsp;b)&nbsp;color&nbsp;that&nbsp;should&nbsp;be&nbsp;used&nbsp;as&nbsp;colorkey&nbsp;(or&nbsp;magic&nbsp;color).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default:&nbsp;None<br>
&nbsp;<br>
:rtype:&nbsp;image</tt></dd></dl>

<dl><dt><a name="IImageLoader-load_image_file_like"><strong>load_image_file_like</strong></a>(self, file_like_obj, colorkey<font color="#909090">=None</font>)</dt><dd><tt>Load&nbsp;a&nbsp;image&nbsp;from&nbsp;a&nbsp;file&nbsp;like&nbsp;<a href="__builtin__.html#object">object</a>.<br>
&nbsp;<br>
:Parameters:<br>
&nbsp;&nbsp;&nbsp;&nbsp;file_like_obj&nbsp;:&nbsp;file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;the&nbsp;file&nbsp;like&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;load&nbsp;the&nbsp;image&nbsp;from.<br>
&nbsp;&nbsp;&nbsp;&nbsp;colorkey&nbsp;:&nbsp;tuple<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;(r,&nbsp;g,&nbsp;b)&nbsp;color&nbsp;that&nbsp;should&nbsp;be&nbsp;used&nbsp;as&nbsp;colorkey&nbsp;(or&nbsp;magic&nbsp;color).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default:&nbsp;None<br>
&nbsp;<br>
:rtype:&nbsp;image</tt></dd></dl>

<dl><dt><a name="IImageLoader-load_image_parts"><strong>load_image_parts</strong></a>(self, filename, margin, spacing, tile_width, tile_height, colorkey<font color="#909090">=None</font>)</dt><dd><tt>Load&nbsp;different&nbsp;tile&nbsp;images&nbsp;from&nbsp;one&nbsp;source&nbsp;image.<br>
&nbsp;<br>
:Parameters:<br>
&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Path&nbsp;to&nbsp;image&nbsp;to&nbsp;be&nbsp;loaded.<br>
&nbsp;&nbsp;&nbsp;&nbsp;margin&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;margin&nbsp;around&nbsp;the&nbsp;image.<br>
&nbsp;&nbsp;&nbsp;&nbsp;spacing&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;space&nbsp;between&nbsp;the&nbsp;tile&nbsp;images.<br>
&nbsp;&nbsp;&nbsp;&nbsp;tile_width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;width&nbsp;of&nbsp;a&nbsp;single&nbsp;tile.<br>
&nbsp;&nbsp;&nbsp;&nbsp;tile_height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;height&nbsp;of&nbsp;a&nbsp;single&nbsp;tile.<br>
&nbsp;&nbsp;&nbsp;&nbsp;colorkey&nbsp;:&nbsp;tuple<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;(r,&nbsp;g,&nbsp;b)&nbsp;color&nbsp;that&nbsp;should&nbsp;be&nbsp;used&nbsp;as&nbsp;colorkey&nbsp;(or&nbsp;magic&nbsp;color).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default:&nbsp;None<br>
&nbsp;<br>
Luckily&nbsp;that&nbsp;iteration&nbsp;is&nbsp;so&nbsp;easy&nbsp;in&nbsp;python::<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;...<br>
&nbsp;&nbsp;&nbsp;&nbsp;w,&nbsp;h&nbsp;=&nbsp;image_size<br>
&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;y&nbsp;in&nbsp;xrange(margin,&nbsp;h,&nbsp;tile_height&nbsp;+&nbsp;spacing):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;x&nbsp;in&nbsp;xrange(margin,&nbsp;w,&nbsp;tile_width&nbsp;+&nbsp;spacing):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br>
&nbsp;<br>
:rtype:&nbsp;a&nbsp;list&nbsp;of&nbsp;images</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ImageLoaderPygame">class <strong>ImageLoaderPygame</strong></a>(<a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Pygame&nbsp;image&nbsp;loader.<br>
&nbsp;<br>
It&nbsp;uses&nbsp;an&nbsp;internal&nbsp;image&nbsp;cache.&nbsp;The&nbsp;methods&nbsp;return&nbsp;Surface.<br>
&nbsp;<br>
:Undocumented:<br>
&nbsp;&nbsp;&nbsp;&nbsp;pygame<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gummworld2.tiledtmxloader.html#ImageLoaderPygame">ImageLoaderPygame</a></dd>
<dd><a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ImageLoaderPygame-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="ImageLoaderPygame-load_image"><strong>load_image</strong></a>(self, filename, colorkey<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="ImageLoaderPygame-load_image_file_like"><strong>load_image_file_like</strong></a>(self, file_like_obj, colorkey<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="ImageLoaderPygame-load_image_part"><strong>load_image_part</strong></a>(self, filename, x, y, w, h, colorkey<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="ImageLoaderPygame-load_image_parts"><strong>load_image_parts</strong></a>(self, filename, margin, spacing, tile_width, tile_height, colorkey<font color="#909090">=None</font>)</dt></dl>

<hr>
Data descriptors inherited from <a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ImageLoaderPyglet">class <strong>ImageLoaderPyglet</strong></a>(<a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Pyglet&nbsp;image&nbsp;loader.<br>
&nbsp;<br>
It&nbsp;uses&nbsp;an&nbsp;internal&nbsp;image&nbsp;cache.&nbsp;The&nbsp;methods&nbsp;return&nbsp;some&nbsp;form&nbsp;of<br>
AbstractImage.&nbsp;The&nbsp;resource&nbsp;module&nbsp;is&nbsp;not&nbsp;used&nbsp;for&nbsp;loading&nbsp;the&nbsp;images.<br>
&nbsp;<br>
Thanks&nbsp;to&nbsp;HydroKirby&nbsp;from&nbsp;#pyglet&nbsp;to&nbsp;contribute&nbsp;the&nbsp;<a href="#ImageLoaderPyglet">ImageLoaderPyglet</a>&nbsp;and&nbsp;the&nbsp;pyglet&nbsp;demo!<br>
&nbsp;<br>
:Undocumented:<br>
&nbsp;&nbsp;&nbsp;&nbsp;pyglet<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gummworld2.tiledtmxloader.html#ImageLoaderPyglet">ImageLoaderPyglet</a></dd>
<dd><a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ImageLoaderPyglet-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="ImageLoaderPyglet-load_image"><strong>load_image</strong></a>(self, filename, colorkey<font color="#909090">=None</font>, fileobj<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="ImageLoaderPyglet-load_image_file_like"><strong>load_image_file_like</strong></a>(self, file_like_obj, colorkey<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="ImageLoaderPyglet-load_image_part"><strong>load_image_part</strong></a>(self, filename, x, y, w, h, colorkey<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="ImageLoaderPyglet-load_image_parts"><strong>load_image_parts</strong></a>(self, filename, margin, spacing, tile_width, tile_height, colorkey<font color="#909090">=None</font>)</dt></dl>

<hr>
Data descriptors inherited from <a href="gummworld2.tiledtmxloader.html#IImageLoader">IImageLoader</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MapObject">class <strong>MapObject</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;single&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;on&nbsp;the&nbsp;map.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;position&nbsp;relative&nbsp;to&nbsp;group&nbsp;x&nbsp;position<br>
&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;position&nbsp;relative&nbsp;to&nbsp;group&nbsp;y&nbsp;position<br>
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;of&nbsp;this&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;of&nbsp;this&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;type&nbsp;of&nbsp;this&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;image_source&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source&nbsp;path&nbsp;of&nbsp;the&nbsp;image&nbsp;for&nbsp;this&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;image&nbsp;:&nbsp;:class:<a href="#TileImage">TileImage</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after&nbsp;loading&nbsp;this&nbsp;is&nbsp;the&nbsp;pygame&nbsp;surface&nbsp;containing&nbsp;the&nbsp;image<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MapObject-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MapObjectGroup">class <strong>MapObjectGroup</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Group&nbsp;of&nbsp;objects&nbsp;on&nbsp;the&nbsp;map.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;x&nbsp;position<br>
&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;y&nbsp;position<br>
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;of&nbsp;the&nbsp;bounding&nbsp;box&nbsp;(usually&nbsp;0,&nbsp;so&nbsp;no&nbsp;use)<br>
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;of&nbsp;the&nbsp;bounding&nbsp;box&nbsp;(usually&nbsp;0,&nbsp;so&nbsp;no&nbsp;use)<br>
&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;of&nbsp;the&nbsp;group<br>
&nbsp;&nbsp;&nbsp;&nbsp;objects&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;the&nbsp;map&nbsp;objects<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MapObjectGroup-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="RendererPygame">class <strong>RendererPygame</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RendererPygame-__init__"><strong>__init__</strong></a>(self, world_map)</dt><dd><tt>#&nbsp;TODO:&nbsp;methods:&nbsp;add_sprite/remove_sprite<br>
#&nbsp;TODO:&nbsp;collapse/uncollapse<br>
#&nbsp;TODO:&nbsp;do&nbsp;calculations&nbsp;of&nbsp;set_camera_position&nbsp;per&nbsp;layer</tt></dd></dl>

<dl><dt><a name="RendererPygame-render_layer"><strong>render_layer</strong></a>(self, surf, layer_id)</dt></dl>

<dl><dt><a name="RendererPygame-set_camera_position"><strong>set_camera_position</strong></a>(self, offset_x, offset_y, width, height, margin<font color="#909090">=1</font>)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Tile">class <strong>Tile</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;single&nbsp;tile.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;of&nbsp;the&nbsp;tile&nbsp;gid&nbsp;=&nbsp;<a href="#TileSet">TileSet</a>.firstgid&nbsp;+&nbsp;<a href="#Tile">Tile</a>.id<br>
&nbsp;&nbsp;&nbsp;&nbsp;images&nbsp;:&nbsp;list&nbsp;of&nbsp;:class:<a href="#TileImage">TileImage</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;<a href="#TileImage">TileImage</a>,&nbsp;either&nbsp;its&nbsp;'id'&nbsp;or&nbsp;'image&nbsp;data'&nbsp;will&nbsp;be&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;properties&nbsp;:&nbsp;dict&nbsp;of&nbsp;name:value<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;propertis&nbsp;set&nbsp;in&nbsp;the&nbsp;editor,&nbsp;name-value&nbsp;pairs<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Tile-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TileImage">class <strong>TileImage</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>An&nbsp;image&nbsp;of&nbsp;a&nbsp;tile&nbsp;or&nbsp;just&nbsp;an&nbsp;image.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;of&nbsp;this&nbsp;image&nbsp;(has&nbsp;nothing&nbsp;to&nbsp;do&nbsp;with&nbsp;gid)<br>
&nbsp;&nbsp;&nbsp;&nbsp;format&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;format&nbsp;as&nbsp;string,&nbsp;only&nbsp;'png'&nbsp;at&nbsp;the&nbsp;moment<br>
&nbsp;&nbsp;&nbsp;&nbsp;source&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;of&nbsp;the&nbsp;image.&nbsp;either&nbsp;this&nbsp;is&nbsp;set&nbsp;or&nbsp;the&nbsp;content<br>
&nbsp;&nbsp;&nbsp;&nbsp;encoding&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encoding&nbsp;of&nbsp;the&nbsp;content<br>
&nbsp;&nbsp;&nbsp;&nbsp;trans&nbsp;:&nbsp;tuple&nbsp;of&nbsp;(r,g,b)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;colorkey&nbsp;color,&nbsp;raw&nbsp;as&nbsp;hex,&nbsp;after&nbsp;calling&nbsp;convert&nbsp;just&nbsp;a&nbsp;(r,g,b)&nbsp;tuple<br>
&nbsp;&nbsp;&nbsp;&nbsp;properties&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;propertis&nbsp;set&nbsp;in&nbsp;the&nbsp;editor,&nbsp;name-value&nbsp;pairs<br>
&nbsp;&nbsp;&nbsp;&nbsp;image&nbsp;:&nbsp;<a href="#TileImage">TileImage</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after&nbsp;calling&nbsp;load&nbsp;the&nbsp;pygame&nbsp;surface<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TileImage-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TileLayer">class <strong>TileLayer</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;layer&nbsp;of&nbsp;the&nbsp;world.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position&nbsp;of&nbsp;layer&nbsp;in&nbsp;the&nbsp;world&nbsp;in&nbsp;number&nbsp;of&nbsp;tiles&nbsp;(not&nbsp;pixels)<br>
&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position&nbsp;of&nbsp;layer&nbsp;in&nbsp;the&nbsp;world&nbsp;in&nbsp;number&nbsp;of&nbsp;tiles&nbsp;(not&nbsp;pixels)<br>
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;of&nbsp;tiles&nbsp;in&nbsp;x&nbsp;direction<br>
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;of&nbsp;tiles&nbsp;in&nbsp;y&nbsp;direction<br>
&nbsp;&nbsp;&nbsp;&nbsp;pixel_width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;of&nbsp;layer&nbsp;in&nbsp;pixels<br>
&nbsp;&nbsp;&nbsp;&nbsp;pixel_height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;of&nbsp;layer&nbsp;in&nbsp;pixels<br>
&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;of&nbsp;this&nbsp;layer<br>
&nbsp;&nbsp;&nbsp;&nbsp;opacity&nbsp;:&nbsp;float<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float&nbsp;from&nbsp;0&nbsp;(full&nbsp;transparent)&nbsp;to&nbsp;1.0&nbsp;(opaque)<br>
&nbsp;&nbsp;&nbsp;&nbsp;decoded_content&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;graphics&nbsp;id&nbsp;going&nbsp;through&nbsp;the&nbsp;map::<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.g&nbsp;[1,&nbsp;1,&nbsp;1,&nbsp;]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where&nbsp;decoded_content[0]&nbsp;is&nbsp;(0,0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decoded_content[1]&nbsp;is&nbsp;(1,0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decoded_content[1]&nbsp;is&nbsp;(width,0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decoded_content[1]&nbsp;is&nbsp;(0,1)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decoded_content[1]&nbsp;is&nbsp;(width,height)<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;usage:&nbsp;graphics&nbsp;id&nbsp;=&nbsp;decoded_content[tile_x&nbsp;+&nbsp;tile_y&nbsp;*&nbsp;width]<br>
&nbsp;&nbsp;&nbsp;&nbsp;content2D&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;list,&nbsp;usage:&nbsp;graphics&nbsp;id&nbsp;=&nbsp;content2D[x][y]<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TileLayer-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="TileLayer-decode"><strong>decode</strong></a>(self)</dt><dd><tt>Converts&nbsp;the&nbsp;contents&nbsp;in&nbsp;a&nbsp;list&nbsp;of&nbsp;integers&nbsp;which&nbsp;are&nbsp;the&nbsp;gid&nbsp;of&nbsp;the&nbsp;used<br>
tiles.&nbsp;If&nbsp;necessairy&nbsp;it&nbsp;decodes&nbsp;and&nbsp;uncompresses&nbsp;the&nbsp;contents.</tt></dd></dl>

<dl><dt><a name="TileLayer-pretty_print"><strong>pretty_print</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TileMap">class <strong>TileMap</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;<a href="#TileMap">TileMap</a>&nbsp;holds&nbsp;all&nbsp;the&nbsp;map&nbsp;data.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;orientation&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orthogonal&nbsp;or&nbsp;isometric&nbsp;or&nbsp;hexagonal&nbsp;or&nbsp;shifted<br>
&nbsp;&nbsp;&nbsp;&nbsp;tilewidth&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;of&nbsp;the&nbsp;tiles&nbsp;(for&nbsp;all&nbsp;layers)<br>
&nbsp;&nbsp;&nbsp;&nbsp;tileheight&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;of&nbsp;the&nbsp;tiles&nbsp;(for&nbsp;all&nbsp;layers)<br>
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;of&nbsp;the&nbsp;map&nbsp;(number&nbsp;of&nbsp;tiles)<br>
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;of&nbsp;the&nbsp;map&nbsp;(number&nbsp;of&nbsp;tiles)<br>
&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;of&nbsp;the&nbsp;map&nbsp;format<br>
&nbsp;&nbsp;&nbsp;&nbsp;tile_sets&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;<a href="#TileSet">TileSet</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;properties&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;propertis&nbsp;set&nbsp;in&nbsp;the&nbsp;editor,&nbsp;name-value&nbsp;pairs,&nbsp;strings<br>
&nbsp;&nbsp;&nbsp;&nbsp;pixel_width&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;of&nbsp;the&nbsp;map&nbsp;in&nbsp;pixels<br>
&nbsp;&nbsp;&nbsp;&nbsp;pixel_height&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;of&nbsp;the&nbsp;map&nbsp;in&nbsp;pixels<br>
&nbsp;&nbsp;&nbsp;&nbsp;layers&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;<a href="#TileLayer">TileLayer</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;map_file_name&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file&nbsp;name&nbsp;of&nbsp;the&nbsp;map<br>
&nbsp;&nbsp;&nbsp;&nbsp;object_groups&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;:class:<a href="#MapObjectGroup">MapObjectGroup</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;indexed_tiles&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dict&nbsp;containing&nbsp;{gid&nbsp;:&nbsp;(offsetx,&nbsp;offsety,&nbsp;surface}&nbsp;if&nbsp;<a href="#TileMap-load">load</a>()&nbsp;was&nbsp;called<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when&nbsp;drawing&nbsp;just&nbsp;add&nbsp;the&nbsp;offset&nbsp;values&nbsp;to&nbsp;the&nbsp;draw&nbsp;point<br>
&nbsp;&nbsp;&nbsp;&nbsp;named_layers&nbsp;:&nbsp;dict&nbsp;of&nbsp;string:TledLayer<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dict&nbsp;containing&nbsp;{name&nbsp;:&nbsp;<a href="#TileLayer">TileLayer</a>}<br>
&nbsp;&nbsp;&nbsp;&nbsp;named_tile_sets&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dict&nbsp;containing&nbsp;{name&nbsp;:&nbsp;<a href="#TileSet">TileSet</a>}<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TileMap-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>The&nbsp;<a href="#TileMap">TileMap</a>&nbsp;holds&nbsp;all&nbsp;the&nbsp;map&nbsp;data.</tt></dd></dl>

<dl><dt><a name="TileMap-convert"><strong>convert</strong></a>(self)</dt><dd><tt>Converts&nbsp;numerical&nbsp;values&nbsp;from&nbsp;strings&nbsp;to&nbsp;numerical&nbsp;values.<br>
It&nbsp;also&nbsp;calculates&nbsp;or&nbsp;set&nbsp;additional&nbsp;data:<br>
pixel_width<br>
pixel_height<br>
named_layers<br>
named_tile_sets</tt></dd></dl>

<dl><dt><a name="TileMap-decode"><strong>decode</strong></a>(self)</dt><dd><tt>Decodes&nbsp;the&nbsp;<a href="#TileLayer">TileLayer</a>&nbsp;encoded_content&nbsp;and&nbsp;saves&nbsp;it&nbsp;in&nbsp;decoded_content.</tt></dd></dl>

<dl><dt><a name="TileMap-load"><strong>load</strong></a>(self, image_loader)</dt><dd><tt>loads&nbsp;all&nbsp;images&nbsp;using&nbsp;a&nbsp;IImageLoadermage&nbsp;implementation&nbsp;and&nbsp;fills&nbsp;up<br>
the&nbsp;indexed_tiles&nbsp;dictionary.<br>
The&nbsp;image&nbsp;may&nbsp;have&nbsp;per&nbsp;pixel&nbsp;alpha&nbsp;or&nbsp;a&nbsp;colorkey&nbsp;set.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TileMapParser">class <strong>TileMapParser</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Allows&nbsp;to&nbsp;parse&nbsp;and&nbsp;decode&nbsp;map&nbsp;files&nbsp;for&nbsp;'Tiled',&nbsp;a&nbsp;open&nbsp;source&nbsp;map&nbsp;editor<br>
written&nbsp;in&nbsp;java.&nbsp;It&nbsp;can&nbsp;be&nbsp;found&nbsp;here:&nbsp;<a href="http://mapeditor.org/">http://mapeditor.org/</a><br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TileMapParser-parse"><strong>parse</strong></a>(self, file_name)</dt><dd><tt>Parses&nbsp;the&nbsp;given&nbsp;map.&nbsp;Does&nbsp;no&nbsp;decoding&nbsp;nor&nbsp;loading&nbsp;the&nbsp;data.<br>
:return:&nbsp;instance&nbsp;of&nbsp;<a href="#TileMap">TileMap</a></tt></dd></dl>

<dl><dt><a name="TileMapParser-parse_decode"><strong>parse_decode</strong></a>(self, file_name)</dt><dd><tt>Parses&nbsp;the&nbsp;map&nbsp;but&nbsp;additionally&nbsp;decodes&nbsp;the&nbsp;data.<br>
:return:&nbsp;instance&nbsp;of&nbsp;<a href="#TileMap">TileMap</a></tt></dd></dl>

<dl><dt><a name="TileMapParser-parse_decode_load"><strong>parse_decode_load</strong></a>(self, file_name, image_loader)</dt><dd><tt>Parses&nbsp;the&nbsp;data,&nbsp;decodes&nbsp;them&nbsp;and&nbsp;loads&nbsp;the&nbsp;images&nbsp;using&nbsp;the&nbsp;image_loader.<br>
:return:&nbsp;instance&nbsp;of&nbsp;<a href="#TileMap">TileMap</a></tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TileSet">class <strong>TileSet</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;tileset&nbsp;holds&nbsp;the&nbsp;tiles&nbsp;and&nbsp;its&nbsp;images.<br>
&nbsp;<br>
:Ivariables:<br>
&nbsp;&nbsp;&nbsp;&nbsp;firstgid&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;first&nbsp;gid&nbsp;of&nbsp;this&nbsp;tileset<br>
&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;name&nbsp;of&nbsp;this&nbsp;<a href="#TileSet">TileSet</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;images&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;TileImages<br>
&nbsp;&nbsp;&nbsp;&nbsp;tiles&nbsp;:&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;Tiles<br>
&nbsp;&nbsp;&nbsp;&nbsp;indexed_images&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after&nbsp;calling&nbsp;load()&nbsp;it&nbsp;is&nbsp;dict&nbsp;containing&nbsp;id:&nbsp;image<br>
&nbsp;&nbsp;&nbsp;&nbsp;indexed_tiles&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after&nbsp;calling&nbsp;load()&nbsp;it&nbsp;is&nbsp;a&nbsp;dict&nbsp;containing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gid:&nbsp;(offsetx,&nbsp;offsety,&nbsp;image)&nbsp;,&nbsp;the&nbsp;image&nbsp;corresponding&nbsp;to&nbsp;the&nbsp;gid<br>
&nbsp;&nbsp;&nbsp;&nbsp;spacing&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;spacing&nbsp;between&nbsp;tiles<br>
&nbsp;&nbsp;&nbsp;&nbsp;marging&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;marging&nbsp;of&nbsp;the&nbsp;tiles<br>
&nbsp;&nbsp;&nbsp;&nbsp;properties&nbsp;:&nbsp;dict<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;propertis&nbsp;set&nbsp;in&nbsp;the&nbsp;editor,&nbsp;name-value&nbsp;pairs<br>
&nbsp;&nbsp;&nbsp;&nbsp;tilewidth&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;actual&nbsp;width&nbsp;of&nbsp;the&nbsp;tile,&nbsp;can&nbsp;be&nbsp;different&nbsp;from&nbsp;the&nbsp;tilewidth&nbsp;of&nbsp;the&nbsp;map<br>
&nbsp;&nbsp;&nbsp;&nbsp;tilehight&nbsp;:&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;actual&nbsp;hight&nbsp;of&nbsp;th&nbsp;etile,&nbsp;can&nbsp;be&nbsp;different&nbsp;from&nbsp;the&nbsp;tilehight&nbsp;of&nbsp;the&nbsp;&nbsp;map<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TileSet-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-decode_base64"><strong>decode_base64</strong></a>(in_str)</dt><dd><tt>Decodes&nbsp;a&nbsp;base64&nbsp;string&nbsp;and&nbsp;returns&nbsp;it.<br>
&nbsp;<br>
:Parameters:<br>
&nbsp;&nbsp;&nbsp;&nbsp;in_str&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base64&nbsp;encoded&nbsp;string<br>
&nbsp;<br>
:returns:&nbsp;decoded&nbsp;string</tt></dd></dl>
 <dl><dt><a name="-decompress_gzip"><strong>decompress_gzip</strong></a>(in_str)</dt><dd><tt>Uncompresses&nbsp;a&nbsp;gzip&nbsp;string&nbsp;and&nbsp;returns&nbsp;it.<br>
&nbsp;<br>
:Parameters:<br>
&nbsp;&nbsp;&nbsp;&nbsp;in_str&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gzip&nbsp;compressed&nbsp;string<br>
&nbsp;<br>
:returns:&nbsp;uncompressed&nbsp;string</tt></dd></dl>
 <dl><dt><a name="-decompress_zlib"><strong>decompress_zlib</strong></a>(in_str)</dt><dd><tt>Uncompresses&nbsp;a&nbsp;zlib&nbsp;string&nbsp;and&nbsp;returns&nbsp;it.<br>
&nbsp;<br>
:Parameters:<br>
&nbsp;&nbsp;&nbsp;&nbsp;in_str&nbsp;:&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zlib&nbsp;compressed&nbsp;string<br>
&nbsp;<br>
:returns:&nbsp;uncompressed&nbsp;string</tt></dd></dl>
 <dl><dt><a name="-demo_pygame"><strong>demo_pygame</strong></a>(file_name)</dt><dd><tt>#&nbsp;------------------------------------------------------------------------------</tt></dd></dl>
 <dl><dt><a name="-demo_pygame_old"><strong>demo_pygame_old</strong></a>(file_name)</dt></dl>
 <dl><dt><a name="-demo_pyglet"><strong>demo_pyglet</strong></a>(file_name)</dt><dd><tt>Thanks&nbsp;to:&nbsp;HydroKirby&nbsp;from&nbsp;#pyglet&nbsp;on&nbsp;freenode.org<br>
&nbsp;<br>
Loads&nbsp;and&nbsp;views&nbsp;a&nbsp;map&nbsp;using&nbsp;pyglet.<br>
&nbsp;<br>
Holding&nbsp;the&nbsp;arrow&nbsp;keys&nbsp;will&nbsp;scroll&nbsp;along&nbsp;the&nbsp;map.<br>
Holding&nbsp;the&nbsp;left&nbsp;shift&nbsp;key&nbsp;will&nbsp;make&nbsp;you&nbsp;scroll&nbsp;faster.<br>
Pressing&nbsp;the&nbsp;escape&nbsp;key&nbsp;ends&nbsp;the&nbsp;application.<br>
&nbsp;<br>
TODO:<br>
Maybe&nbsp;use&nbsp;this&nbsp;to&nbsp;put&nbsp;topleft&nbsp;as&nbsp;origin:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;glMatrixMode(GL_PROJECTION);<br>
&nbsp;&nbsp;&nbsp;&nbsp;glLoadIdentity();<br>
&nbsp;&nbsp;&nbsp;&nbsp;glOrtho(0.0,&nbsp;(double)mTarget-&gt;w,&nbsp;(double)mTarget-&gt;h,&nbsp;0.0,&nbsp;-1.0,&nbsp;1.0);</tt></dd></dl>
 <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>#&nbsp;------------------------------------------------------------------------------</tt></dd></dl>
 <dl><dt><a name="-printer"><strong>printer</strong></a>(obj, ident<font color="#909090">=''</font>)</dt><dd><tt>Helper&nbsp;function,&nbsp;prints&nbsp;a&nbsp;hirarchy&nbsp;of&nbsp;objects.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = u'DR0ID_ @ 2009-2011'<br>
<strong>__revision__</strong> = u'$Id: tiledtmxloader.py 268 2011-03-11 05:15:37Z stabbingfinger@gmail.com $'<br>
<strong>__version__</strong> = '2.3.1.1'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">DR0ID_&nbsp;@&nbsp;2009-2011</td></tr></table>
</body></html>